<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改考勤设置')" />
</head>
<body class="white-bg">
<br>
<h4 class="form-header h4">考勤设置信息</h4>
    <form class="form-horizontal m" id="form-attendanceset-edit" th:object="${workstudyAttendanceset}">
        <div class="col-md-12">
            <input name="attendancesetId" th:field="*{attendancesetId}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label">每天最长考勤时间(小时)：</label>
                <div class="col-sm-9">
                    <input type="text" name="maxtime" th:field="*{maxtime}" class="form-control" placeholder="请输入每天最长考勤时间（比如8）">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">每周最大考勤次数(天数)：</label>
                <div class="col-sm-9">
                    <input type="text" name="maxday" th:field="*{maxday}" class="form-control" placeholder="请输入每周最大考勤天数（比如3）">
                </div>
            </div>
        </div>
    </form>
<br>
    <div class="row">
        <div class="col-sm-offset-5 col-sm-10">
            <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
            <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "workstudy/attendanceset";
        $("#form-attendanceset-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-attendanceset-edit').serialize());
            }
        }
    </script>
</body>
</html>